import request from "../utils/request.js"
/*
 * 获取绩效信息
 */
export const getPerfromInfo = () => {
  return request({
    method: 'GET',
    url: '/api/perfrom/getperfromInfo',
    data: {}
  })
}
/*
 * 获取班组工时排名信息
 */
export const getPerfromPaim = () => {
  return request({
    method: 'GET',
    url: '/api/perfrom/getPerfromPaim',
    data: {}
  })
}
/*
 * 获取个人生产工时信息
 */
export const getPersonalTime = (user) => {
  return request({
    method: 'POST',
    url: '/api/perfrom/getPersonalTime',
    data: {
      user
    }
  })
}
/*
 * 获取个人辅助工时信息
 */
export const getFuzhuTime = (user) => {
  return request({
    method: 'POST',
    url: '/api/perfrom/getPersonalFuzhuTime',
    data: {
      user
    }
  })
}

/*
 * 获取辅助工时类型列表
 */
export const getAssistTimeList = () => {
  return request({
    method: 'GET',
    url: '/api/perfrom/getAssistTimeList',
    data: {}
  })
}
/*
 * 提交辅助工时信息
 */
export const submitApplyInfo = (data) => {
  return request({
    method: 'POST',
    url: '/api/perfrom/submitApplyInfo',
    data: data
  })
}
/*
 * 获取已申请辅助工时列表
 */
export const getDoneApplyTimeList = (user) => {
  return request({
    method: 'POST',
    url: '/api/perfrom/getDoneApplyTimeList',
    data: {
      user
    }
  })
}
/*
 * 获取辅助工时审核列表
 */
export const getApplyCheckList = () => {
  return request({
    method: 'GET',
    url: '/api/perfrom/getApplyCheckList',
    data: {}
  })
}
/*
 * 工时申请通过
 */
export const updateApplyTimeList = data => {
  return request({
    method: 'PUT',
    url: '/api/perfrom/updateApplyTimeList',
    data: data
  })
}
/*
 * 工时申请拒绝
 */
export const refuseApplyTimeList = data => {
  return request({
    method: 'PUT',
    url: '/api/perfrom/refuseApplyTimeList',
    data: data
  })
}